package com.chexiehui.jc.mvp.home;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BaseView;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 贷款额度测算
 * @Auth SongJun
 * @Date 2019/11/20 10:05
 **/
public interface LoanQuotaCalculateCovenant {

    interface View extends BaseView {
        void onSendCodeSuccess(BaseModel<Object> successResult);

        void onSendCodeFailure(BaseModel<Object> failureResult);

        void onDoApplySuccess(BaseModel<Object> successResult);

        void onDoApplyFailure(BaseModel<Object> failureResult);

        String getPersonName();

        String getPersonMobile();
        String getPhoneCode();

        String getPersonCity();

        int getPersonIncome();

        int getPersonSecurity();

        int getPersonTime();

        int getPersonSeeCar();

        String getCarModelId();

        int getSeeCar();
    }

    interface Stores {

        @FormUrlEncoded
        @POST(Constants.SEND_CODE)
        Observable<BaseModel<Object>> sendCode(@Field("phone") String phone);
        @FormUrlEncoded
        @POST(Constants.CHECK_CODE)
        Observable<BaseModel<Object>> checkCode(@Field("phone") String phone, @Field("code") String code);
        @FormUrlEncoded
        @POST(Constants.URL_LOAN_QUOTA_CALCULATE)
        Observable<BaseModel<Object>> doApply(
                @Field("carmodelId_SelSource") String carmodelId_SelSource,
                @Field("monthlyIncome_Sel") int monthlyIncome_Sel,
                @Field("hasSecurity") int hasSecurity,
                @Field("time_Sel") int time_Sel,
                @Field("hasSeeCar") int hasSeeCar,
                @Field("name") String name,
                @Field("mobile") String mobile,
                @Field("city") String city,
                @Field("isSee") int isSee
        );
    }

    interface Presenter {
        void sendCode();
        void doApply();

    }

}